//
//  SQLiteDataBaseManager.h
//  18-SQLite
//
//  Created by 王道林 on 16/8/8.
//  Copyright © 2016年 王道林. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
@class Student;
NS_ASSUME_NONNULL_BEGIN
@interface SQLiteDataBaseManager : NSObject
{
    sqlite3 *dbPoint;
}

//  单例方法.  一个工程中 只包含这一个对象.
+ (SQLiteDataBaseManager *)shareManager;


- (BOOL)openSQlite3;

- (BOOL)closeSQLite3;

- (BOOL)crateTable;

- (BOOL)insertStu:(Student *)stu;

- (BOOL)deleteStu:(Student *)stu;

- (BOOL)deleteAll;

- (BOOL)updataOldName:(NSString *)oldName
              newName:(NSString *)newName;


// 查询
- (__kindof NSArray *)selectAll;



@end
NS_ASSUME_NONNULL_END